package com.cq.hd.member.factory;

import com.cq.hd.member.api.dto.WithdrawalApplyDto;
import com.cq.hd.member.api.dto.WithdrawalApplyV2Dto;
import com.cq.hd.system.api.vo.WithdrawalConfigVo;

import javax.annotation.PostConstruct;

public abstract class AbstractWithdrawalHandler {

    @PostConstruct
    public void init() {
        WithdrawalFactory.register(getType(), this);
    }

    protected abstract Integer getType();

    public abstract Boolean apply(WithdrawalApplyDto withdrawalApplyDto, WithdrawalConfigVo withdrawalConfigVo);

    public abstract Boolean applyV2(WithdrawalApplyV2Dto withdrawalApplyV2Dto, WithdrawalConfigVo withdrawalConfigVo);
}
